/*
 * BoardEvent.java
 *
 * Created on 9 maj 2007, 18:55
 *
 */

package pl.krakow.ae.knp.wikiboard.gui.board;

import pl.krakow.ae.knp.wikiboard.gui.drawables.Drawable;

/**
 *
 * A class that represents an event that occured. It may be
 * creating a new Drawable, deleting a Drawable or changing a Drawable.
 *
 */
public class BoardEvent {
    
    public Drawable removedDrawable, addedDrawable;
    
    /** Creates new instance of BoardEvent.
     * @param removedDrawable an object to be removed, null if none.
     * @param addedDrawable an object ot be added, null if none.
     *
     * The constructor allows to express three kinds of events factually:
     * 1. A Drawable has been drawn - BoardEvent(null, addedDrawable)
     * 2. A Drawable has been removed - BoardEvent(removedDrawable, null)
     * 3. Combination of first two events - BoardEvent(removedDrawable, addedDrawable)
     */
    public BoardEvent(Drawable removedDrawable, Drawable addedDrawable) {
        this.removedDrawable = removedDrawable;
        this.addedDrawable = addedDrawable;
    }
}
